<?php
/**
 * TOP API: taobao.tbk.order.details.get request
 * 
 * @author auto create
 * @since 1.0, 2020.03.12
 */
class TbkPrivilegeGetRequest
{
	/** 
	 * 	淘客商品id
	 **/
	private $item_id;
	
	/** 
	 * 推广位id，mm_xx_xx_xx pid三段式中的第三段
	 **/
	private $adzone_id;
	
	/** 
	 * 1：PC，2：无线，默认：１
	 **/
	private $platform = 1;
	
	/** 
	 * 备案的网站id, mm_xx_xx_xx pid三段式中的第二段
	 **/
	private $site_id;
	
	/** 
	 * 营销计划链接中的me参数
	 **/
	private $me;
	
	/** 
	 * 渠道关系ID，仅适用于渠道推广场景
	 **/
	private $relation_id;
	
	
	private $apiParas = array();

	
	public function setItemId($item_id)
	{
		$this->item_id = $item_id;
		$this->apiParas["item_id"] = $item_id;
	}

	public function getItemId($item_id)
	{
		return $this->item_id;
	}

	public function setAdzoneId($adzone_id)
	{
		$this->adzone_id = $adzone_id;
		$this->apiParas["adzone_id"] = $adzone_id;
	}

	public function getAdzoneId($adzone_id)
	{
		return $this->adzone_id;
	}
 
	public function setPlatform($platform)
	{
		$this->platform = $platform;
		$this->apiParas["platform"] = $platform;
	}

	public function getPlatform($platform)
	{
		return $this->platform ;
	}

	public function setSiteId($site_id)
	{
		$this->site_id = $site_id;
		$this->apiParas["site_id"] = $site_id;
	}

	public function getSiteId($site_id)
	{
		return $this->site_id;
	}

	public function setMe($me)
	{
		$this->me = $me;
		$this->apiParas["me"] = $me;
	}

	public function getMe($me)
	{
		return $this->me;
	}

	public function setRelationId($relation_id)
	{
		$this->relation_id = $relation_id;
		$this->apiParas["relation_id"] = $relation_id;
	}

	public function getRelationId($relation_id)
	{
		return $this->relation_id;
	}
	
	public function getApiParas()
	{
		return $this->apiParas;
	}

	public function getApiMethodName()
	{
		return "taobao.tbk.privilege.get";
	}
	
	public function check()
	{		
		RequestCheckUtil::checkNotNull($this->item_id,"item_id");
		RequestCheckUtil::checkNotNull($this->adzone_id,"adzone_id");
		RequestCheckUtil::checkNotNull($this->site_id,"adzone_id");
	}
	
	public function putOtherTextParam($key, $value) {
		$this->apiParas[$key] = $value;
		$this->$key = $value;
	}
}
